pp108 : Advanced Functions

Advanced Functions

This topic describes the various advanced functions available with the default Process Platform XSLT function library.

Advanced functions are used to perform complex operations on data. Right-click the Map Canvas (middle) pane of the Modeler tab in the Data Transformation model, and select Advanced from the the required <Function> library. Refer to Transforming Data using XSLT Functions, for more information on the procedure to transform the data using XSLT functions. The various advanced functions supported by Cordys, their functionality, and parameters that have to be specified are described in the table below:
Table 1. Advanced Functions

Advanced Function

Description

Parameters

Value Mapping

For a given source element, value pairs can be defined. Each value pair consists of the value of the source element, and a value specified by the user. During transformation, based on the value pair defined by the user, the source element's value is replaced by the corresponding value. The new value can in turn be mapped to the target.

The inputs to this function block are as follows:

  1. Source Element - The source element for which the value pair is defined is the input for this parameter.
  2. Value to be Replaced - The value of the source element that should be replaced is the input for this parameter.
  3. Value to Replace - The value of the source element that should replace the value specified in the second parameter is the input for this parameter. The above inputs are required for each value pair.

Trigger Web Service

This function is used to trigger a Web service for retrieving value pairs from a database.

The inputs to this function block are as follows:

  1. Request - The parameters of the Web service are the inputs for this block. Do the following:
    • Drag the required Web service, from the Workspace Explorer, or the Quick Access Menu from My Documents view, to this block.
    • Click the attribute in the Source Template and click the required parameter in the request block. The XPath of the attribute is displayed as a parameter.
  2. Response Element to be Added - The element/node of the response, that is to be mapped to the target element/node, is the input for this parameter.
  3. Suppress Error - This parameter allows you to supply a boolean value of 'true' or 'false' to suppress errors.

    Note:

    • If the boolean value is set to 'true', errors (SOAP fault) during the execution of the Web service will be suppressed. However, data transformation will be carried out and the target element will take the value provided in the 'Default Value'.
    • If the boolean value is set to 'false', in the event of errors during the execution of the Web service, data transformation will be aborted, and the error details will be displayed in the response.
  4. Default Value - This parameter takes as input the default value that is to be provided in the target element, when there is a 'suppressed error'.

Local Lookup

This function is used to retrieve values for data translation from a content map.

The inputs to this function block are as follows:

  1. Source - The element in the source tree for which the value pair should be retrieved from the content map.
  2. Content Map Path - The path of the content map from which the value pairs should be retrieved.
  3. Entity - The value of the entity in the content map for which the value pair should be retrieved.
  4. Source System - The value of the source system in the content map, based on which the entities will be picked up.
  5. Destination System - The value of the destination system in the content map, based on which the entities will be picked up.
  6. Default Value - The default action to be taken, if the entity is not found in the content map.
    Takes a boolean value of true or false.
    • True if you want the target to contain the same value as the source.
    • False if you do not want the target to contain any value.

      Note: Drag the required content map from the Workspace Explorer to the map canvas area. The Content Map Path is populated in the properties section, by default.

Custom Java Call

This function is used to retrieve the value returned from a Custom Java method.

The inputs for this function block are as follows:

  1. Class Name (Fully Qualified Name) - The class name of the Java method. Type the Fully Qualified Name of the class that contains the custom Java method. For example: com.cordys.cpc.translation.utils.ContentMapping.
    Note: You should type the path of the jar, which contains the above method, in the Classpath of the JRE Configuration tab of Data Transformation Service Container.
  2. Method Name - Name of the custom Java method. For example: customMethod.
  3. Parameter- The parameters of the method are the inputs for this block. Do any of the following:
    • Click the attribute in the Source Template and click the required parameter in the request block. The XPath of the attribute is displayed as a parameter.
    • Type the value in the parameter field directly.
Custom XSLT This function is used to embed Custom XSLT
  • The input for this function block is the Custom XSLT content.
  • You can use the Validate option to verify the correctness of the XSLT content.

Note:

  • The Source element(input) link is optional for this function. However, when a source is defined, the repetition and context are considered during custom XSLT code execution.
  • The XSLT provided here is used to create the target node structure and values are mapped according the XPath of the Source element provided in the XSLT.
  • To view the XPath of the source or target element, right-click the required element and click Show XPath option in the context menu. The complete path of the element from the root node is displayed in the dialog box that appears.

For more information on using the Custom XSLT , refer to link.